<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar"
                    aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">MicrioBlog</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                <li class="<%=isActivePostLi%>"><a href="/post">发布</a></li>
            </ul>
            <%
                if(!user && isIndexRouter){
            %>
            <%- include('navForm') %>
            <%    
                }else if(user){
            %>

            <ul class="nav navbar-nav navbar-right">
                <li class="active"><a style="background-color:#222222" href="/"><%=user.name%></a></li>
                <li><a href="/user/logout">登出</a></li>
            </ul>
            <!-- <p class="navbar-text navbar-right nav-user">
                    <%=user.name%>
                </p> -->

            <%       
            }
            %>
        </div>
    </div>
</nav>